11 research outputs found

    A Concurrent Language with a Uniform Treatment of Regions and Locks

    Full text link
    A challenge for programming language research is to design and implement multi-threaded low-level languages providing static guarantees for memory safety and freedom from data races. Towards this goal, we present a concurrent language employing safe region-based memory management and hierarchical locking of regions. Both regions and locks are treated uniformly, and the language supports ownership transfer, early deallocation of regions and early release of locks in a safe manner

    A Type System for Unstructured Locking that Guarantees Deadlock Freedom without Imposing a Lock Ordering

    Full text link
    Deadlocks occur in concurrent programs as a consequence of cyclic resource acquisition between threads. In this paper we present a novel type system that guarantees deadlock freedom for a language with references, unstructured locking primitives, and locks which are implicitly associated with references. The proposed type system does not impose a strict lock acquisition order and thus increases programming language expressiveness.Comment: In Proceedings PLACES 2010, arXiv:1110.385

    Static safety guarantees for concurrent programming languages

    No full text
    Modern computers ranging from desktop PC to supercomputers have multicore processors. Multi-core processors bring more computing power into a chip and software plays an essential role in utilizing this power. Multithreaded programming is a widely used paradigm for exploiting concurrency in multicore systems. An inherent side-effect of this paradigm is non-determinism of execution, which allows for invalid execution interleavings to occur. Such interleavings cannot be easily reproduced, thereby making the development of reliable concurrent software a hard task. Data races and deadlocks are two wellknown consequences of non-deterministic execution. Informally, a data race occurs when multiple threads concurrently access the same memory location without synchronization. A set of threads reaches a deadlocked state, when each thread in that set is waiting for a lock in cyclic order. This dissertation shows that it is possible to increase the reliability of concurrent programs, by eliminating memory access violations, data races and deadlocks from multithreaded programs. In particular, we present the theory and implementation of a series of type systems and static analyses that provide absolute guarantees regarding multithreaded program execution. In the theoretical parts, we present the formal semantics of the type systems and languages and give formal soundness proofs. In the implementation parts we discuss how we integrated these formal systems in real programming languages and the challenges that we met. We also provide extensive measurements for the performance of each analysis and compare alternative techniques.Τα σύγχρονα υπολογιστικά συστήματα από επιτραπέζιους υπολογιστές μέχρι υπερυπολογιστές φέρουν πολυπύρηνους (multicore) επεξεργαστές. Οι πολυπύρηνοι επεξεργαστές αποδίδουν περισσότερη υπολογιστική ισχύ σε ένα τσιπ και το λογισμικό διαδραματίζει καθοριστικό ρόλο στην αξιοποίηση της. Ο πολυνηματικός προγραμματισμός είναι ένα ευρέως χρησιμοποιούμενο πρότυπο προγραμματισμού για την αξιοποίηση του ταυτοχρονισμού σε πολυπύρηνα συστήματα. Μια εγγενής παρενέργεια αυτού του προτύπου είναι η μη ντετερμινιστική εκτέλεση των νημάτων, η οποία επιτρέπει να συμβούν ανεπιθύμητες νηματικές διεμπλοκές (thread interleavings). Τέτοιες διεμπλοκές δεν μπορούν να αναπαραχθούν εύκολα αφού εξαρτώνται από τον χρόνο, καθιστώντας δύσκολη την αξιόπιστη ανάπτυξη ταυτόχρονου λογισμικού. Οι συνθήκες ανταγωνισμού (data races) και τα αδιέξοδα (deadlocks) είναι δύο γνωστές συνέπειες της μη ντετερμινιστικής εκτέλεσης. Η συνθήκη ανταγωνισμού είναι μία κατάσταση κατά την οποία πολλαπλά νήματα έχουν ταυτόχρονη πρόσβαση στην ίδια θέση μνήμης χωρίς συγχρονισμό. Ένα σύνολο από νήματα φτάνει σε αδιέξοδο, όταν κάθε νήμα βρίσκεται σε αναμονή για μια κλειδαριά, η οποία είναι κλειδωμένη από κάποιο άλλο νήμα του ίδιου συνόλου. Σε αυτή την διατριβή δείχνουμε ότι είναι δυνατό να αυξηθεί η αξιοπιστία των ταυτόχρονων προγραμμάτων, με την εξάλειψη των παραβιάσεων πρόσβασης μνήμης, συνθηκών ανταγωνισμού και αδιεξόδων από πολυνηματικά προγράμματα. Συγκεκριμένα, παρουσιάζουμε την θεωρία και υλοποίηση συστημάτων τύπων (type systems) και στατικών αναλύσεων (static analyses) που παρέχουν κάποιες εγγυήσεις αξιοπιστίας σχετικά με την πολυνηματική εκτέλεση προγραμμάτων. Στα θεωρητικά τμήματα της διατριβής παρουσιάζουμε την τυπική σημασιολογία (formal semantics) των συστημάτων τύπων και των γλωσσών και δίνουμε τυπικές αποδείξεις ορθότητας. Στα πρακτικά τμήματα αναλύουμε την ενσωμάτωση των τυπικών συστημάτων που αναπτύξαμε σε πραγματικές γλώσσες προγραμματισμού και τις προκλήσεις που συναντήσαμε. Επίσης παρουσιάζουμε εκτεταμένες μετρήσεις για την απόδοση των αναλύσεων μας και τις συγκρίνουμε με εναλλακτικές τεχνικές

    Forsaking Inheritance: Supercharged Delegation in DelphJ

    No full text
    We propose DelphJ: a Java-based OO language that eschews inheritance completely, in favor of a combination of class morphing and (deep) delegation. Compared to past delegation approaches, the novel aspect of our design is the ability to emulate the best aspects of inheritance while retaining maximum flexibility: using morphing, a class can select any of the methods of its delegatee and export them (if desired) or transform them (e.g., to add extra arguments or modify type signatures), yet without needing to name these methods explicitly and handle them one-by-one. Compared to past work on morphing, our approach adopts and adapts advanced delegation mechanisms, in order to add late binding capabilities and, thus, provide a full substitute of inheritance. Additionally, we explore complex semantic issues in the interaction of delegation with late binding. We present our language design both informally, with numerous examples, and formally in a core calculus

    Foo: A Minimal Modern OO Calculus

    No full text
    We present the Flyweight Object-Oriented (Foo) calculus for the modeling of object-oriented languages. Foo is a simple, minimal class-based calculus, modeling only essential computational aspects and emphasizing larger-scale features (e.g., inheritance and generics). Foo is motivated by the observation that recent language design work focuses on elements not well-captured either by traditional object calculi or by language-specific modeling efforts, such as Featherweight Java. Foo integrates seamlessly both nominal and structural subtyping ideas, leveraging the latter to eliminate the need for modeling object fields and constructors. Comparing to recent formalization efforts in the literature, Foo is more compact, yet versatile enough to be usable in multiple settings modeling Java, C#, or Scala extensions

    Forsaking Inheritance: Supercharged Delegation in DelphJ

    No full text
    We propose DelphJ: a Java-based OO language that eschews inheritance completely, in favor of a combination of class morphing and (deep) delegation. Compared to past delegation approaches, the novel aspect of our design is the ability to emulate the best aspects of inheritance while retaining maximum flexibility: using morphing, a class can select any of the methods of its delegatee and export them (if desired) or transform them (e.g., to add extra arguments or modify type signatures), yet without needing to name these meth- ods explicitly and handle them one-by-one. Compared to past work on morphing, our approach adopts and adapts advanced delegation mechanisms, in order to add late binding capabilities and, thus, provide a full substitute of inheritance. Additionally, we explore complex semantic issues in the interaction of delegation with late binding. We present our language design both informally, with numerous examples, and formally in a core calculus

    Reified Type Parameters Using Java Annotations

    No full text
    Java generics are compiled by-erasure: all clients reuse the same bytecode, with uses of the unknown type erased. C++ templates are compiled by-expansion: each type-instantiation of a template pro- duces a different code definition. The two approaches offer trade- offs on multiple axes. We propose an extension of Java generics that allows by-expansion translation relative to selected type pa- rameters only. This language design allows sophisticated users to get the best of both worlds at a fine granularity. Furthermore, our proposal is based on Java 8 Type Annotations (JSR 308) and the Checker Framework as an abstraction layer for controlling compi- lation without changes to the internals of a Java compiler

    Static safety guarantees for concurrent programming languages

    No full text
    64 σ.Ο πολυνηματικός προγραμματισμός είναι ένα ευρέως χρησιμοποιούμενο πρότυπο προγραμματισμού για την αξιοποίηση του ταυτοχρονισμού σε πολυπύρηνα συστήματα. Μια εγγενής παρενέργεια αυτού του προτύπου είναι η μη ντετερμινιστική εκτέλεση των νημάτων. Σε αυτή την διατριβή δείχνουμε ότι είναι δυνατό να αυξηθεί η αξιοπιστία των ταυτόχρονων προγραμμάτων, με την εξάλειψη των παραβιάσεων πρόσβασης μνήμης, συνθηκών ανταγωνισμού και αδιεξόδων από πολυνηματικά προγράμματα. Συγκεκριμένα, παρουσιάζουμε την θεωρία και υλοποίηση συστημάτων τύπων (type systems) και στατικών αναλύσεων (static analyses) που παρέχουν κάποιες εγγυήσεις αξιοπιστίας σχετικά με την πολυνηματική εκτέλεση προγραμμάτων. Επίσης παρουσιάζουμε εκτεταμένες μετρήσεις για την απόδοση των αναλύσεών μας.Multi-threaded programming is widely used for enabling concurrency in multi-core architectures. An inherent side-effect of multi-threaded programming is the non-deterministic execution of threads. In this thesis we show that the reliability of concurrent programs can be increased by eliminating memory errors, data races and deadlocks from multi-threaded programs. Importantly, we present the theory and implementation of type system and static analyses that guarantee reliable execution of multi-threaded programs as well as some very promising benchmarks.Πρόδρομος Ε. Γερακιό

    Reified type parameters using Java annotations

    No full text
    corecore